//
//  BezierView.m
//  CALayerDemo
//
//  Created by YYPan on 2018/5/18.
//  Copyright © 2018年 YYPan. All rights reserved.
//

#import "BezierView.h"

@implementation BezierView

- (void)drawRect:(CGRect)rect {
	[[UIColor redColor] set];
	
//	UIBezierPath *path = [UIBezierPath bezierPath];
//	[path moveToPoint:CGPointMake(100, 100)];
//	[path addLineToPoint:CGPointMake(200, 300)];
//	path.lineWidth = 5;
//	[path stroke];

//	UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(200, 350, 100, 100)];
//	path.lineWidth = 5;
//	path.lineCapStyle = kCGLineCapRound;
//	path.lineJoinStyle = kCGLineCapRound;
//	[path stroke];

//	UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(100, 500, 100, 100) cornerRadius:30];
//	path.lineWidth = 5;
//	path.lineCapStyle = kCGLineCapRound;
//	path.lineJoinStyle = kCGLineCapRound;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(100, 100, 100, 100) byRoundingCorners:UIRectCornerTopLeft cornerRadii:CGSizeMake(30, 30)];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(100, 100, 100, 100)];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(100, 100, 120, 100)];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(200, 200) radius:100 startAngle:M_PI endAngle:M_PI * 3/2 clockwise:YES];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPath];
//	[path moveToPoint:CGPointMake(100, 200)];
//	[path addQuadCurveToPoint:CGPointMake(300, 200) controlPoint:CGPointMake(100, 0)];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPath];
//	[path moveToPoint:CGPointMake(0, 200)];
//	[path addCurveToPoint:CGPointMake(200, 200) controlPoint1:CGPointMake(50, 100) controlPoint2:CGPointMake(150, 300)];
//	path.lineWidth = 5;
//	[path stroke];
	
//	UIBezierPath *path = [UIBezierPath bezierPath];
//	[path moveToPoint:CGPointMake(200, 200)];
//	[path addArcWithCenter:CGPointMake(200, 200) radius:100 startAngle:M_PI_2 endAngle:2 * M_PI clockwise:YES];
//	path.lineWidth = 5;
//	[path closePath];
//	[path stroke];
}


@end
